<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      texlive-20190410-source
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-2020-04-02">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 2020-04-02
      </h4>
      <h3>
        Chapter&nbsp;51.&nbsp;Typesetting
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="tl-installer.html" title=
          "install-tl-unx">Prev</a>
          <p>
            install-tl-unx
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="asymptote.html" title=
          "asymptote-2.65">Next</a>
          <p>
            asymptote-2.65
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="typesetting.html" title=
          "Chapter&nbsp;51.&nbsp;Typesetting">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 2020-04-02">
          Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="texlive" name="texlive"></a>texlive-20190410-source
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to TeX Live from source
        </h2>
        <p>
          Most of TeX Live can be built from source without a pre-existing
          installation, but <span class="application">xindy</span> (for
          indexing) needs working versions of <span class=
          "command"><strong>latex</strong></span> and <span class=
          "command"><strong>pdflatex</strong></span> when configure is run,
          and the testsuite and install for <span class=
          "command"><strong>asy</strong></span> (for vector graphics) will
          fail if TeX has not already been installed. Additionally,
          <span class="application">biber</span> is not provided within the
          <span class="application">texlive</span> source.
        </p>
        <p>
          All of those packages are dealt with on their own pages and can be
          built after installing this package. If you have not already done
          so, you should start at <a class="xref" href="tex-path.html" title=
          "Setting the PATH for TeX Live">Setting the PATH for TeX Live</a>
          so that the final commands to initialise the new installation will
          be found.
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (FTP): <a class="ulink" href=
                "ftp://tug.org/texlive/historic/2019/texlive-20190410-source.tar.xz">
                ftp://tug.org/texlive/historic/2019/texlive-20190410-source.tar.xz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: be4b20aa60861bc510bcbc5b228bcb51
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 52 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 7.2 GB including the
                additional download and the tests, 6.0 GB installed
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: 5.6 SBU including the additional
                download and the tests, building with parallelism=4
              </p>
            </li>
          </ul>
        </div>
        <h3>
          Required Additional Downloads
        </h3>
        <p>
          Much of the texlive environment (including scripts, documentation,
          fonts, and various other files) is not part of the source tarball.
          You must download it separately. This will give you all of the
          additional files which are provided by a full install of the binary
          version, there is no realistic way to restrict which parts get
          installed.
        </p>
        <p>
          Because of the size of this package, it is unlikely to be mirrored
          by BLFS mirrors. In case of difficulty, go to
          http://www.ctan.org/mirrors/ to find a more-accessible mirror.
        </p>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (FTP): <a class="ulink" href=
                "ftp://tug.org/texlive/historic/2019/texlive-20190410-texmf.tar.xz">
                ftp://tug.org/texlive/historic/2019/texlive-20190410-texmf.tar.xz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: 586bb6cb6c30ce7efba256b956df6bc2
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 2.5 GB
              </p>
            </li>
            <li class="listitem">
              <p>
                Required patch: <a class="ulink" href=
                "http://www.linuxfromscratch.org/patches/blfs/svn/texlive-20190410-source-upstream_fixes-1.patch">
                http://www.linuxfromscratch.org/patches/blfs/svn/texlive-20190410-source-upstream_fixes-1.patch</a>
              </p>
            </li>
          </ul>
        </div>
        <h3>
          TeX Live from source Dependencies
        </h3>
        <h4>
          Recommended
        </h4>
        <p class="recommended">
          <a class="xref" href="gs.html" title=
          "ghostscript-9.52">ghostscript-9.52</a> <span class=
          "emphasis"><em>including <code class=
          "filename">libgs.so</code></em></span>, <a class="xref" href=
          "../x/installing.html" title=
          "Chapter&nbsp;24.&nbsp;X Window System Environment">X Window
          System</a>
        </p>
        <p class="recommended">
          The source ships with its own versions of <span class=
          "emphasis"><em>many</em></span> libraries, and will use them unless
          it is forced to use the system versions. The following are
          recommended so that the system version will be used: <a class=
          "xref" href="../general/fontconfig.html" title=
          "Fontconfig-2.13.1">Fontconfig-2.13.1</a>, <a class="xref" href=
          "../general/freetype2.html" title=
          "FreeType-2.10.1">FreeType-2.10.1</a>, <a class="xref" href=
          "../general/gc.html" title="GC-8.0.4">GC-8.0.4</a>, <a class="xref"
          href="../general/graphite2.html" title=
          "Graphite2-1.3.13">Graphite2-1.3.13</a>, <a class="xref" href=
          "../general/harfbuzz.html" title=
          "HarfBuzz-2.6.4">HarfBuzz-2.6.4</a> (built with graphite2 enabled),
          <a class="xref" href="../general/icu.html" title=
          "ICU-66.1">ICU-66.1</a>, <a class="xref" href=
          "../general/libpaper.html" title=
          "libpaper-1.1.24+nmu5">libpaper-1.1.24+nmu5</a> (used by at least
          context and xelatex), and <a class="xref" href=
          "../general/libpng.html" title="libpng-1.6.37">libpng-1.6.37</a>
        </p>
        <p class="recommended">
          Furthermore, the instructions below assume you are using the layout
          described in <a class="xref" href="tex-path.html" title=
          "Setting the PATH for TeX Live">Setting the PATH for TeX Live</a>.
        </p>
        <h4>
          Optional
        </h4>
        <p class="optional">
          The source ships with its own versions of several libraries which
          are either not under active development, or only used for limited
          functionality. If you install these, as with some other optional
          dependencies in this book you will need to tell <span class=
          "command"><strong>configure</strong></span> to use the system
          versions. <a class="ulink" href="https://libgd.github.io/">GD</a>,
          <a class="ulink" href=
          "https://fossies.org/linux/misc/old/t1lib-5.1.2.tar.gz/">t1lib</a>,
          <a class="ulink" href=
          "https://github.com/gdraheim/zziplib/">ZZIPlib</a>, <a class=
          "ulink" href=
          "http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&amp;id=TECkitDownloads">
          TECkit</a>
        </p>
        <h4>
          Runtime dependencies
        </h4>
        <p class="recommended">
          <a class="xref" href="../general/python2.html" title=
          "Python-2.7.17">Python-2.7.17</a> is used by many scripts.
          <a class="xref" href="../general/ruby.html" title=
          "Ruby-2.7.1">Ruby-2.7.1</a> is used by some scripts, mostly within
          mtx_context which is part of <span class=
          "application">conTeXt</span>, but also for one or two others, such
          as match_parens, which are generally useful. The perl module
          <a class="ulink" href=
          "https://cpan.metacpan.org/authors/id/S/SR/SREZIC/Tk-804.034.tar.gz">
          Tk</a>, which requires <a class="xref" href="../general/tk.html"
          title="Tk-8.6.10">Tk-8.6.10</a>, is used by one of the scripts for
          ptex (Japanese vertical writing), can be used by a conTeXt texfind
          script, and is needed for texdoctk (a GUI interface for finding
          documentation files and opening them with the appropriate viewer).
        </p>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/texlive">http://wiki.linuxfromscratch.org/blfs/wiki/texlive</a>
        </p>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of TeX Live
        </h2>
        <p>
          Install TeX Live by running the following commands:
        </p>
        <p>
          The shared libraries will be installed into a texlive directory. As
          the <code class="systemitem">root</code> user, add it to your
          <code class="filename">/etc/ld.so.conf</code>:
        </p>
        <pre class="root">
<kbd class="command">cat &gt;&gt; /etc/ld.so.conf &lt;&lt; EOF
<code class="literal"># Begin texlive 2019 addition

/opt/texlive/2019/lib

# End texlive 2019 addition</code>
EOF</kbd>
</pre>
        <div class="admon note">
          <img alt="[Note]" src="../images/note.png" />
          <h3>
            Note
          </h3>
          <p>
            From 2015 onwards, a successful install requires some texlive
            commands to be run as the root user, so we will export the
            TEXARCH variable to let <code class="systemitem">root</code> use
            it.
          </p>
          <p>
            In the 2019 release, <span class="application">dvisvgm</span>
            cannot be built if shared system libraries are used. This means
            that <a class="xref" href="asymptote.html" title=
            "asymptote-2.65">asymptote-2.65</a> will not be able to create
            svg files.
          </p>
        </div>
        <p>
          Now, as a normal user:
        </p>
        <pre class="userinput">
<kbd class=
"command">export TEXARCH=$(uname -m | sed -e 's/i.86/i386/' -e 's/$/-linux/') &amp;&amp;

patch -Np1 -i ../texlive-20190410-source-upstream_fixes-1.patch &amp;&amp;

mkdir texlive-build &amp;&amp;
cd texlive-build    &amp;&amp;

../configure                                                    \
    --prefix=/opt/texlive/2019                                  \
    --bindir=/opt/texlive/2019/bin/$TEXARCH                     \
    --datarootdir=/opt/texlive/2019                             \
    --includedir=/opt/texlive/2019/include                      \
    --infodir=/opt/texlive/2019/texmf-dist/doc/info             \
    --libdir=/opt/texlive/2019/lib                              \
    --mandir=/opt/texlive/2019/texmf-dist/doc/man               \
    --disable-native-texlive-build                              \
    --disable-static --enable-shared                            \
    --disable-dvisvgm                                           \
    --with-system-cairo                                         \
    --with-system-fontconfig                                    \
    --with-system-freetype2                                     \
    --with-system-gmp                                           \
    --with-system-graphite2                                     \
    --with-system-harfbuzz                                      \
    --with-system-icu                                           \
    --with-system-libgs                                         \
    --with-system-libpaper                                      \
    --with-system-libpng                                        \
    --with-system-mpfr                                          \
    --with-system-pixman                                        \
    --with-system-zlib                                          \
    --with-banner-add=" - BLFS" &amp;&amp;

make</kbd>
</pre>
        <p>
          To test the results, issue: <span class="command"><strong>make
          check</strong></span> A few tests may SKIP because kpathsea has not
          yet been installed.
        </p>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make install-strip &amp;&amp;
/sbin/ldconfig &amp;&amp;
make texlinks &amp;&amp;
mkdir -pv /opt/texlive/2019/tlpkg/TeXLive/ &amp;&amp;
install -v -m644 ../texk/tests/TeXLive/* /opt/texlive/2019/tlpkg/TeXLive/</kbd>
</pre>
        <div class="admon note">
          <img alt="[Note]" src="../images/note.png" />
          <h3>
            Note
          </h3>
          <p>
            Only run <span class="command"><strong>make
            texlinks</strong></span> once. If it is rerun, it can change all
            the program symlinks so that they point to themselves and are
            useless.
          </p>
        </div>
        <p>
          Now install the additional files as the <code class=
          "systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class=
"command">tar -xf ../../texlive-20190410-texmf.tar.xz -C /opt/texlive/2019 --strip-components=1</kbd>
</pre>
        <p>
          Still as the <code class="systemitem">root</code> user, initialise
          the new system (the commands <span class=
          "command"><strong>fmtutil-sys --all</strong></span> and
          <span class="command"><strong>mtxrun --generate</strong></span>
          will produce a <span class="emphasis"><em>lot</em></span> of
          output):
        </p>
        <pre class="root">
<kbd class="command">mktexlsr &amp;&amp;
fmtutil-sys --all &amp;&amp;
mtxrun --generate</kbd>
</pre>
        <p>
          You can now proceed to <a class="xref" href="asymptote.html" title=
          "asymptote-2.65">asymptote-2.65</a>, <a class="xref" href=
          "biber.html" title="biber-2.14">biber-2.14</a> and / or <a class=
          "xref" href="xindy.html" title="xindy-2.5.1">xindy-2.5.1</a> if you
          wish to install them.
        </p>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <span class="command"><strong>patch -Np1 -i
          ../texlive-20190410-source-upstream_fixes-1.patch</strong></span>:
          various problems have come to light since the shipped source was
          frozen to be committed to DVDs.
        </p>
        <p>
          <em class="parameter"><code>--prefix=, --bindir=, --datarootdir=,
          --infodir=, --mandir= ...</code></em> : these switches ensure that
          the files installed from source will overwrite any corresponding
          files previously installed by <span class=
          "application">install-tl-unx</span> so that the alternative methods
          of installing <span class="application">texlive</span> are
          consistent.
        </p>
        <p>
          <em class="parameter"><code>--includedir=, --libdir=
          ...</code></em> : these switches ensure that the libraries and
          include files will be within the directories for this year's
          texlive.
        </p>
        <p>
          <em class="parameter"><code>--disable-static</code></em>: This
          switch prevents installation of static versions of the libraries.
        </p>
        <p>
          <em class="parameter"><code>--enable-shared</code></em>: Use shared
          versions of <code class="filename">libkpathsea</code>, <code class=
          "filename">libptexenc</code>, <code class=
          "filename">libsynctex</code>, <code class=
          "filename">libtexlua52</code> and <code class=
          "filename">libtexluajit</code>.
        </p>
        <p>
          <em class="parameter"><code>--with-system-...</code></em>: Unless
          this parameter is used, the included versions of these libraries
          will be statically compiled into the programs which need them. If
          you decided not to install a recommended library, omit the
          corresponding switch.
        </p>
        <p>
          <span class="command"><strong>--disable-dvisvgm</strong></span>: As
          noted above, the shipped version of dvisvgm, which has modified
          configuration files, cannot be built with shared system libraries.
        </p>
        <p>
          <code class="option">--without-x</code>: use this if you do not
          have Xorg installed.
        </p>
        <p>
          <span class="command"><strong>/sbin/ldconfig</strong></span>: this
          has to be run here so that <span class="command"><strong>make
          texlinks</strong></span> can use kpsewhich.
        </p>
        <p>
          <span class="command"><strong>make texlinks</strong></span> : this
          runs the texlinks.sh script to create symbolic links from formats
          to engines. In practice, several of the targets such as
          <span class="command"><strong>xetex</strong></span> are now
          separate binaries and for these it will report "file already
          exists".
        </p>
        <p>
          <span class="command"><strong>tar -xf texlive-20190410-texmf.tar.xz
          -C /opt/texlive/2019 --strip-components=1</strong></span>: the
          tarball contains the files for the texmf-dist directory, and
          because of its size we do not want to waste time and space
          untarring it and then copying the files.
        </p>
        <p>
          <span class="command"><strong>install -v -m644
          ../texk/tests/TeXLive/*
          /opt/texlive/2019/tlpkg/TeXLive/</strong></span>: This puts the
          perl modules <code class="filename">TLConfig.pm</code> and
          <code class="filename">TLUtils.pm</code> into the directory where
          the binary installer puts them - it is at the start of the perl
          @INC@ PATH within texlive when installed using the above configure
          switches. Without these modules, texlive is unusable.
        </p>
        <p>
          <span class="command"><strong>mktexlsr</strong></span>: Create an
          <code class="filename">ls-R</code> file which lists what was
          installed - this is used by kpathsea to find files.
        </p>
        <p>
          <span class="command"><strong>fmtutil-sys --all</strong></span>:
          This initializes the TeX formats, Metafont bases and Metapost mems.
        </p>
        <p>
          <span class="command"><strong>mtxrun --generate</strong></span>:
          This initializes the ConTeXt system.
        </p>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Programs:</strong>
              <span class="segbody">Over 300 binaries and symlinks to
              scripts</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Libraries:</strong>
              <span class="segbody">libkpathsea.so, libptexenc.so,
              libsynctex.so, libtexlua52.so, libtexluajit.so</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directories:</strong>
              <span class="segbody">/opt/texlive/2019/bin,
              /opt/texlive/2019/include, /opt/texlive/2019/lib,
              /opt/texlive/2019/texmf-dist</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="texlive-programs" name=
                    "texlive-programs"></a><span class="term"><span class=
                    "command"><strong>TeX&nbsp;programs</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    The programs included in <span class=
                    "application">TeX</span> are too numerous to individually
                    list. Please refer to the individual program HTML and PDF
                    pages in the various html, man, or pdf files within the
                    subdirectories of <code class=
                    "filename">2019/texmf-dist/</code>. Using <span class=
                    "command"><strong>texdoc pdflatex</strong></span> (
                    replace <span class="emphasis"><em>pdflatex</em></span>
                    with the command name ) may also be useful.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libkpathsea" name="libkpathsea"></a><span class=
                    "term"><code class=
                    "filename">libkpathsea.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    (kpathsearch) exists to look up a file in a list of
                    directories and is used by <span class=
                    "command"><strong>kpsewhich</strong></span>.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libptexenc" name="libptexenc"></a><span class=
                    "term"><code class="filename">libptexenc.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a library for Japanese pTeX (publishing TeX).
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libsynctex" name="libsynctex"></a><span class=
                    "term"><code class="filename">libsynctex.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    is the SyncTeX (Synchronize TeXnology) parser library.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libtexlua52" name="libtexlua52"></a><span class=
                    "term"><code class=
                    "filename">libtexlua52.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    provides Lua 5.2, modified for use with LuaTeX.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libtexluajit" name="libtexluajit"></a><span class=
                    "term"><code class=
                    "filename">libtexluajit.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    provides LuaJIT, modified for use with LuaJITTeX.
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-03-25 07:06:24 -0500
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="tl-installer.html" title=
          "install-tl-unx">Prev</a>
          <p>
            install-tl-unx
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="asymptote.html" title=
          "asymptote-2.65">Next</a>
          <p>
            asymptote-2.65
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="typesetting.html" title=
          "Chapter&nbsp;51.&nbsp;Typesetting">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 2020-04-02">
          Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
